<template>
  <div id="app">
    <router-view/>
  </div>
</template>

<script>
export default {
  mounted(){
    // 关闭浏览器窗口的时候清空浏览器缓存在localStorage的数据
    window.onbeforeunload = function (e) {
      var storage = window.localStorage;
      if (sessionStorage.token){
      }else {
        storage.clear();
      }
    };
  }
}
</script>

<style>
#app {
  min-height: 100vh;
}
</style>
